﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GesturePlugin;

namespace GestureActionPlugin
{
    /// <summary>
    /// Allows changing dynamically the implement strategy
    /// </summary>
    class GestureActionStrategyManager
    {
        private IGestureActionStrategy _gestureActionStrategy;

        /// <summary>
        /// Current strategy
        /// </summary>
        public IGestureActionStrategy GestureActionStategy
        {
            get
            {
                return _gestureActionStrategy;
            }
            set
            {
                _gestureActionStrategy = value;
            }
        }

        /// <summary>
        /// Launchs the ExecuteAction method of the current strategy
        /// </summary>
        /// <param name="gesture">recognized gesture by the gesturePlugin</param>
        public void ExecuteAction(Gesture gesture)
        {
            _gestureActionStrategy.ExecuteAction(gesture);
        }
    }
}
